<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
	<binding id="symbol">
		<handlers>
			<handler event="click" action="SearchParts();"/>
		</handlers>
		<implementation>
			<method name="SearchParts">
				<body>
					<![CDATA[
						schwin = window.open("../sch/index.html?s=" + this.firstChild.nodeValue.toUpperCase(), "", "");
					]]>
				</body>
			</method>
		</implementation>
	</binding>
	<binding id="refmnl">
		<handlers>
			<handler event="click" action="SearchManual();"/>
		</handlers>
		<implementation>
			<method name="SearchManual">
				<body>
					<![CDATA[
						var refmnl = this.firstChild.nodeValue.toUpperCase().split("NO.")[1];
						var fname = "";
						var patharray = location.pathname.split("/");
						var ext = patharray[patharray.length-1].split("_")[1];
						if (ext != null) {
							fname = refmnl + "_" + ext;
						}
						var existdoc = true;
						var _xmltoc = document.implementation.createDocument("", "", null);
						_xmltoc.async = false;
						if (refmnl != "") {
							try {
								_xmltoc.load("../../" + refmnl + "/doc/toc.xml");
								schwin = window.open("../../" + refmnl + "/doc/index.html?f=" + fname, "", "");
							} catch(e) {
								existdoc = false;
							}
						}
					]]>
				</body>
			</method>
		</implementation>
	</binding>
	<binding id="linkimg">
		<handlers>
			<handler event="click" action="openSvg();"/>
		</handlers>
		<implementation>
			<method name="openSvg">
				<body>
					<![CDATA[
						fplen = this.getAttribute("src").split("/").length;
						fn = this.getAttribute("src").split("/")[fplen-1];
						fn = fn.split(".")[0] + ".svgz";
						var svgwin = window.open("","","toolbar=yes,location=no,derectories=no,resizable=yes,width=640,height=480");
						svgwin.focus();
						svgwin.document.writeln('<html>');
						svgwin.document.writeln('<head>');
						svgwin.document.writeln('<style>');
						svgwin.document.writeln('body {background-color: #CCCCCC; margin: 0px;}');
						svgwin.document.writeln('</style>');
						svgwin.document.writeln('<title>' + fn + '</title>');
						svgwin.document.writeln('</head>');
						svgwin.document.writeln('<body>');
						svgwin.document.writeln('<embed src="' + fn + '" name="SVG" pluginspage="http://www.adobe.com/svg/viewer/install" style="width:100%;height:100%" type="image/svg+xml" />');
						svgwin.document.writeln('</body>');
						svgwin.document.writeln('</html>');
						svgwin.document.close();
					]]>
				</body>
			</method>
		</implementation>
	</binding>
</bindings>
